package com.shouxin.attendance.constants;

public enum BabyType {

    /** 未知 */
    UNKNOWN("未知"),

    /** 住校生 */
    RESIDENT("住校生"),

    /** 走读生 */
    EXTERN("走读生"),

    /** 半走读 */
    HALF_EXTERN("半走读");

    private String name;

    BabyType(String name) {
        this.name = name;
    }

    public static BabyType getType(int type) {
        for (BabyType t : values()) {
            if (t.ordinal() == type) {
                return t;
            }
        }
        return EXTERN;
    }

    public String getName() {
        return name;
    }
}
